<div class="section">
  <script type="text/javascript">
	function checkpro(){
		var form = document.sac;
		if(form.name.value == ""){
			alert("Please enter name");
			form.name.focus();
			return false;
		}
		if(isNaN(form.order.value)){
			alert("Order by number only");
			form.order.focus();
			return false;
		}	}
  </script>
  <!--[if !IE]>start title wrapper<![endif]-->
  <div class="title_wrapper"> <span class="title_wrapper_top"></span>
    <div class="title_wrapper_inner"> <span class="title_wrapper_middle"></span>
      <div class="title_wrapper_content">
        <h2 class="menu_title">Add new game</h2>
      </div>
    </div>
    <span class="title_wrapper_bottom"></span> </div>
  <!--[if !IE]>end title wrapper<![endif]-->
  <!--[if !IE]>start section content<![endif]-->
  <div class="section_content"> <span class="section_content_top"></span>
    <div class="section_content_inner">
      <div class="table_tabs_menu">
        <!--[if !IE]>start  tabs<![endif]-->
        <!--[if !IE]>end  tabs<![endif]-->
      </div>
      <!--[if !IE]>start table_wrapper<![endif]-->
      <div class="table_wrapper" style="background:none;">
        <div class="table_wrapper_inner">
          <div class="error_red">
            <?php if(isset($error)) { echo "<p>".$error."</p>"; } ?>
            <?php echo validation_errors();?> </div>
          <form action="<?php echo base_url();?>admin/games/add" method="post" name="sac" onsubmit="return checkpro()" enctype="multipart/form-data">
            <div class="form_items">
              <div class="form_items_left">Name of game</div>
              <div class="form_items_right">
                <input name="name" type="text" size="30" />
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Order by</div>
              <div class="form_items_right">
                <input name="order" type="text" size="30" />
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Game hot?</div>
              <div class="form_items_right">
                <input name="hot" type="radio" value="1" />Yes
                <input name="hot" type="radio" value="0" checked="checked" />No
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Select category</div>
              <div class="form_items_right">
                <select name="cate_id">
                  <?php
					foreach($listcate as $list){
						echo "<option value='".$list['cate_id']."'>".$list['cate_name']."</option>";
					}
				  ?>
                </select>
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Select tag</div>
              <div class="form_items_right">
                <select name="tagid">
                  <?php
					foreach($listtags as $tags){
						echo "<option value='".$tags['id']."'>".$tags['name']."</option>";
					}
				  ?>
                </select>
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Author - Source</div>
              <div class="form_items_right">
                <input name="author" type="text" size="30" />
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Url game</div>
              <div class="form_items_right">
                <input name="source" type="text" size="30" />
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">SEO keyworks</div>
              <div class="form_items_right">
                <textarea name="keywords" cols="27" rows="5"></textarea>
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">SEO Description</div>
              <div class="form_items_right">
                <textarea name="descripts" cols="27" rows="5"></textarea>
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Short infomartion</div>
              <div class="form_items_right">
                <?php 
					$fck = new FCKeditor('shortinfo');
					$fck->BasePath = sBASEPATH;
					//$fck->Value  = $info['customer_info'];
					$fck->Width  = '100%';
					$fck->Height = 400;
					$fck->Create();
				 ?>
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">Image</div>
              <div class="form_items_right">
                <input type="file" name="img" size="30" />
              </div>
            </div>
            <div class="form_items">
              <div class="form_items_left">&nbsp;</div>
              <div class="form_items_right">
                <input type="submit" name="ok" value="Add game" class="magin"/>
              </div>
            </div>
          </form>
        </div>
      </div>
      <!--[if !IE]>end table_wrapper<![endif]-->
    </div>
    <span class="section_content_bottom"></span> </div>
  <!--[if !IE]>end section content<![endif]-->
</div>
